import java.util.*;

/**
 * @author LKQ
 * @date 2022/4/21 9:53
 * @description 直接排序
 */
public class Solution2 {
    public static void main(String[] args) {

    }
    public int[][] kClosest(int[][] points, int k) {
        Arrays.sort(points, (a, b) -> (a[0] * a[0] + a[1] * a[1]) - (b[0] * b[0] + b[1] * b[1]));
        return Arrays.copyOfRange(points, 0, k);
    }
}
